/**
 * Created by root on 17-1-5.
 */

function displayInfo(args) {
    var output = "";
    if (typeof args.name == 'string') {
        output += 'Name:' + args.name + "\n";
    }
    if(typeof args.age == 'number') {
        output += 'Age:' + args.age + '\n';
    }
    return output;
}

console.log(displayInfo({name:'hehe',age:20}));
console.log(displayInfo({name:'gerge'}));

var colors = new Array(1);
colors[0] = 1;
colors[1] = 2;
colors[2] = 3;
console.log('colors length is:' + colors.length);
console.log(colors.lastIndexOf());
console.log(Array.isArray(colors));
console.log(colors.toString());
console.log(colors.toLocaleString());
console.log(colors.join('|'));
console.log(colors.shift(111));
